<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/16
 * Time: 9:25
 */

namespace app\admin\model;


use PDO;
use think\Model;
use traits\model\SoftDelete;

class User extends Model
{
    use SoftDelete;
    protected $autoWriteTimestamp = true;
    protected $createTime = 'add_time';
    public function getSexAttr($val)
    {
        switch ($val){
            case '1':
                return '男';
                break;
            case '2':
                return '女';
                break;
            default:
                return '未知';
                break;
        }

    }
}